<script src="<?=$this->baseUrl?>/js/prototype/prototype.js"	type="text/javascript"></script>
<link media="screen, projection" href="<?=$this->baseUrl?>/css/reset.css" rel="stylesheet" type="text/css" />
<link media="screen, projection" href="<?=$this->baseUrl?>/css/menu.css" rel="stylesheet" type="text/css" />

<!-- 载入 varienGrid -->
<script src="<?=$this->baseUrl?>/js/grid.js"	type="text/javascript"></script>

<div>
	<a href="<?=$this->url ( array ('action' => 'logout', 'controller' => 'index' ) )?>"><?=$this->languages->_ ( 'logout' )?></a>
</div>

<!-- menu start -->
<div class="nav-bar">
<?php drawMenuLevel($this->baseUrl,$this->adminMenuArray); ?>

<?php function drawMenuLevel($baseUrl, $_menu, $_level=0) { ?>
    <ul <?php if(!$_level): ?>id="nav"<?php endif ?>>
        <?php foreach ($_menu as $_item): ?>
        <li <?php if(!empty($_item['children'])): ?>onmouseover="Element.addClassName(this,'over')" onmouseout="Element.removeClassName(this,'over')"<?php endif ?> class=" <?php echo (!$_level && !empty($_item['active']))?' active':'' ?> <?php echo !empty($_item['children'])?' parent':'' ?><?php echo (!empty($_level) && !empty($_item['last']))?' last':'' ?> level<?php echo $_level ?>"> <a href="<?= $baseUrl . '/' . $_item['url']['module'] . '/' . $_item['url']['controller'] . '/' . $_item['url']['action'] ?>" <?php if(!empty($_item['title'])): ?>title="<?= $_item['title'] ?>"<?php endif ?> <?php if(!empty($_item['click'])): ?>onclick="<?php echo $_item['click']; ?>"<?php endif ?> class="<?php echo ($_level===0 && !empty($_item['active']))?'active':'' ?>"><span><?php echo $_item['label'] ?><?php if(!$_level): ?><?php endif ?></span></a>
            <?php if(!empty($_item['children'])): ?>
                <?php drawMenuLevel($baseUrl, $_item['children'], $_level+1); ?>
            <?php endif; ?>
        </li>
        <?php endforeach; ?>
    </ul>
<?php }//function ?>
</div>
<!-- menu end -->